package com.capgemini.orf.dao;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.EntityManager;

import com.capgemini.orf.datamodel.Customer;
import com.capgemini.orf.datamodel.Project;

public class ProjectDao {

	public Project getProjectById(long id) {
		EntityManager em = EntityManagerFactoryHolder.get().createEntityManager();
		try {
			return em.find(Project.class, id);
		} finally {
			em.close();
		}
	}

	public List<Project> getProjectsByCustomerAndName(Customer customer, String name) {
		// for list of suggestions

		// TODO

		return new ArrayList<Project>();
	}
}
